LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Squeeze KDE Plasma DT - Can't Create Folder/File (https://www.linuxquestions.org/questions/linux-desktop-74/squeeze-kde-plasma-dt-cant-create-folder-file-942352/)

r00ster 04-28-2012 10:26 PM

Squeeze KDE Plasma DT - Can't Create Folder/File
 
I know this is going to make me look like an idiot...

I recently installed Deb 6.04-kde; which, as I've come to learn, doesn't display the usual icons on the DT Workspace. The problem I'm having is that I can't seem to figure out a way to create new folders or post new files to the workspace.

E.g., When I click on the empty DT Workspace and select, "Create New", "Text File" from the drop down menu, and enter a text/file name/location in the title box, I get an error message per "KDE Plasma Desktop" window:
Quote:

Access denied
Could not write to /home/xxx/Desktop/<file name>
Is there a simple way to post new files and folders on the Workspace, or do I have to do a 'mkdir' thing, ...or what?

If it is any help:
Code:

~/Desktop$ id  -a
uid=1000(rooster) gid=1000(rooster) groups=1000(rooster),,snip>

r.

qlue 04-29-2012 02:24 AM

Silly question but, are you logged in as 'rooster'?
Try checking the file permissions for that directory. You can do that by going to the parent directory and typing ls -l
for example,
Code:

qlue@umzinto:~$ ls -l
total 56
-rw-r--r-- 1 qlue qlue 18470 Apr 23 22:16 alsa-info.out
drwxr-xr-x 5 qlue qlue  4096 Apr 28 19:19 altera
drwxr-xr-x 2 qlue qlue  4096 Apr 27 10:05 backup
drwxr-xr-x 2 qlue qlue  4096 Apr 23 22:10 bin
drwxr-xr-x 2 qlue qlue  4096 Apr 27 07:35 documents
drwxr-xr-x 4 qlue qlue  4096 Apr 27 07:22 downloads
drwxr-xr-x 3 qlue qlue  4096 Apr 26 18:36 images
drwxr-xr-x 2 qlue qlue  4096 Apr 22 22:10 music
drwxr-xr-x 2 qlue qlue  4096 Apr 29 09:13 tmp
drwxr-xr-x 2 qlue qlue  4096 Apr 26 21:48 videos

It's possible that ~/Desktop is set to read only in your case!

r00ster 04-29-2012 10:25 PM

glue:

Bingo!
Code:

<snip>
drwxr-xr-x 2 root    root      4096 Apr 10 13:39 Desktop
<snip>

That did occur to me after I logged out last nite.

So I'm looking at a 'chmod' thing.
I'm the onliest user on this machine; ...login password protected against the grandkids of course.
I haven't had to use 'chmod' before. I tried:
Code:

# chmod a=rwx Desktop
...and got:
Code:

drwxrwxrwx 2 root    root        4096 Apr 10 13:39 Desktop
...not what I was hoping for. What would have been the correct command?
r.

qlue 04-30-2012 02:25 AM

Actually, if that directory is empty the easiest solution is to delete it as root and recreate it as a regular user.
The permissions were correct except that it was owned by root.

However, to change ownership you can issue the following;
Code:

sudo chown -Rv rooster ~/Desktop
sudo chgrp -Rv rooster ~/Desktop

tip: don't login as root but use sudo instead.

Now to fix those permissions;
Code:

chmod -Rv 755 ~/Desktop
After that, your ~/Desktop directory should be correct.

Don't log in as root or use 'sudo su' when doing things. Just use sudo when you need to issue commands as root. It may be tedious, but in most situations you don't need root privileges.

Working in root may be the reason this happened. :)

r00ster 04-30-2012 11:52 AM

DOH!!!

r00ster 04-30-2012 11:57 AM

glue;

AFAIK, 'sudo' isn't a valid call for root privileges for Debian GNU/Linux Squeeze et.al. But that could have changed since Sarge, Etch, Lenny and I wouldn't know. I know 'sudo' is the correct call for Ubuntu, Knoppix, Mepis and some other distros. I tried it anyway.
Code:

~$ whoami                                                       
rooster
~$ sudo chown -Rv rooster ~/Desktop
                                                                                 
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:                       

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
                                                                                 
[sudo] password for rooster:
Sorry, try again.
[sudo] password for rooster:
Sorry, try again.
[sudo] password for rooster:
rooster is not in the sudoers file.  This incident will be reported.

Neither my user nor my root passwords worked.

FYI: I could have been misinformed of course. Perhaps since this is a fresh installation, I need to do something to put my user name in a 'sudoers' file; or something.

My man page shows:
Quote:

~$ sudo
usage: sudo -h | -K | -k | -L | -V
usage: sudo -v [-AknS] [-g groupname|#gid] [-p prompt] [-u user name|#uid]
usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U user name] [-u user
name|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user
name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user name|#uid]
...and...
Quote:

rooster@royrogers:~$ sudo -l
[sudo] password for rooster:
Sorry, user rooster may not run sudo on royrogers
I tried using 'su' which is my usual call for root privileges.

Code:

~$ su chown -Rv rooster ~/Desktop
su: invalid option -- 'R'
Usage: su [options] [LOGIN]

Options:
  -c, --command COMMAND        pass COMMAND to the invoked shell
  -h, --help                    display this help message and exit
  -, -l, --login                make the shell a login shell
  -m, -p,
  --preserve-environment        do not reset environment variables, and
                                keep the same shell
  -s, --shell SHELL            use SHELL instead of the default in passwd

No joy...Man 'chown' shows the '-R' switch
Quote:

-R, --recursive
operate on files and directories recursively
So I don't know why it would be kicked out.


r.

qlue 04-30-2012 12:48 PM

Ooops!
I didn't realise that the default Debian doesn't have sudo setup automatically.
Well, just running those commands from a root shell will work correctly in this case.
I would suggest setting up the sudoers file but I'm not sure how! (I've never had to do it myself)

However, the advice of not using root except when absolutely needed is still valid.

As to why it won't run recursively, I'm not sure. If the directory is empty you can leave out the -Rv switches.

r00ster 04-30-2012 02:08 PM

Quote:

Originally Posted by qlue (Post 4666907)
Ooops!
I didn't realise that the default Debian doesn't have sudo setup automatically.
Well, just running those commands from a root shell will work correctly in this case.

You're not alone. This issue crops up every time a new iteration of Debian GNU/Linux rolls out; ... drives pilgrims like me crazy.
Quote:

I would suggest setting up the sudoers file but I'm not sure how! (I've never had to do it myself)
I just came across a link. It's over my head by a couple of leagues, so I'll have to dig into it by 'n bye.

http://wiki.debian.org/sudo


Quote:

However, the advice of not using root except when absolutely needed is still valid.
I agree. 'sudo' protocol makes good sense to me.

Quote:

As to why it won't run recursively, I'm not sure. If the directory is empty you can leave out the -Rv switches.
Code:

rooster@royrogers:~$ ls -l
<snip>
drwxrwxrwx 2 root    root        4096 Apr 10 13:39 Desktop
<snip>

rooster@royrogers:~$ su
Password:
root@royrogers:/home/rooster# whoami
root

root@royrogers:~# chown -v rooster ~/Desktop
chown: cannot access `/root/Desktop': No such file or directory
failed to change ownership of `/root/Desktop' to rooster

root@royrogers:/home/rooster# chown -v rooster ~/Desktop
chown: cannot access `/root/Desktop': No such file or directory
failed to change ownership of `/root/Desktop' to rooster

Whaaaa?

r.

qlue 04-30-2012 03:59 PM

change ~/Desktop to /home/rooster/Desktop
This is the reason why working as root is more difficult. All the pointers are now to different places!
So;
Code:

chown -v rooster /home/rooster/Desktop
chgrp -v rooster /home/rooster/Desktop
chmod -Rv 755 /home/rooster/Desktop


r00ster 05-01-2012 04:32 AM

glue;

That seems to have done the trick.

Code:

rooster@royrogers:~$ su
Password:
root@royrogers:/home/rooster# chown -v rooster /home/rooster/Desktop
changed ownership of `/home/rooster/Desktop' to rooster
root@royrogers:/home/rooster# chgrp -v rooster /home/rooster/Desktop
changed group of `/home/rooster/Desktop' to rooster                               
root@royrogers:/home/rooster# chmod -Rv 755 /home/rooster/Desktop
mode of `/home/rooster/Desktop' changed to 0755 (rwxr-xr-x)
mode of `/home/rooster/Desktop/aptitude_update_apr9.12' retained as 0755 (rwxr-xr-x)                                                                                 
root@royrogers:/home/rooster#

Code:

<snip>
drwxr-xr-x 2 rooster rooster      4096 Apr 10 13:39 Desktop
<snip>

I think I just had a John Phillip Suza moment.

Thanks.

Now back to my OP. The Squeeze "Plasma Workspace" which I'm used to calling "My Desktop" is 'tabla rasa'. I'm used to seeing icons for Home, Trash, & etc. The other thing I'm used to is being able to R/Click on the Desktop Workspace and get a menu that includes "Create New" for folders and files. I need that function.
Now a R/Click on the Desktop Workspace gives the menu:
Quote:

Run Command
Add Widgets, Add Panel
Remove this Desktop Activity
Lock Widgets
Lock Screen
Leave
Desktop Activity Settings
I still have to copy my Lenny Files & Folders into Squeeze. I 'dasn't' until this 'Plasma Workspace' makes some sense to me.

r.

r00ster 05-02-2012 03:09 PM

I think (ahem) I might have found the problem with my deb6/Squeeze installation that has been confusing the heck out of me for the last couple of weeks.

Given that I am way over my head here, I seem to be missing some key files that pretty much everyone else got with their installs;... and assumed I got too.

E.g.,
Quote:

xdg-user-dirs/
Code:

/etc/xdg/user-dirs.con
/etc/xdg/user-dirs.defaults

I have no idea how to correct this. All I can provide is what I do have in the '/etc/xdg' directory
and hope some kind soul will give me a clue as to how I can get a 'normal' desktop/workspace.

Code:

rooster@royrogers:~$ cd /etc/xdg
rooster@royrogers:/etc/xdg$ ls -l
total 8
drwxr-xr-x 2 root root 4096 Apr 10 11:55 autostart
drwxr-xr-x 2 root root 4096 Apr 10 11:53 menus
rooster@royrogers:/etc/xdg$ cd autostart
rooster@royrogers:/etc/xdg/autostart$ ls -l
total 20
-rw-r--r-- 1 root root  238 Apr 23  2009 kerneloops-applet.desktop
-rw-r--r-- 1 root root 2545 Nov 16  2010 polkit-gnome-authentication-agent-1.desktop
-rw-r--r-- 1 root root  908 Sep 29  2010 polkit-kde-authentication-agent-1.desktop
-rw-r--r-- 1 root root 6279 Sep 28  2010 print-applet.desktop
rooster@royrogers:/etc/xdg/autostart$ cd /etc/xdg
rooster@royrogers:/etc/xdg$ cd menus
rooster@royrogers:/etc/xdg/menus$ ls -l
total 16
lrwxrwxrwx 1 root root    40 Apr 10 11:50 debian-menu.menu -> /var/lib/menu-xdg/menus/debian-menu.menu
-rw-r--r-- 1 root root 10920 Sep  3  2011 kde4-applications.menu
-rw-r--r-- 1 root root  280 Jul 20  2010 kde4-information.menu
rooster@royrogers:/etc/xdg/menus$ cd 2011 kde4-applications.menu

Hoping against hope, I did an 'aptitude search' for the missing files; ... no joy.

qlue 05-02-2012 10:13 PM

All I can suggest is that you try re-installing the Kde meta-package. (perhaps with Synaptic?)
And I think you might want to start a new thread with a slightly different title. I seem to be the only person responding to this thread and I was concentrating on the permissions issue. (which is independent of desktop environment)

You could try either;
Code:

apt-get install kde-standard
or;
Code:

apt-get install kde-full
Either one should give you a more complete install unless that meta-package has already been installed. (in which case you'll get the message, "xxx is already the newest version.")

r00ster 05-03-2012 01:03 AM

Quote:

Originally Posted by qlue (Post 4668990)
All I can suggest is that you try re-installing the Kde meta-package. (perhaps with Synaptic?)
And I think you might want to start a new thread with a slightly different title. I seem to be the only person responding to this thread and I was concentrating on the permissions issue. (which is independent of desktop environment)

I agree. To continue in this wise would likely be misleading to others.
Same time, the missing files seems to be the reason for my inability to copy files to Desktop... I'm surprised no one else seems to have reported the same issue.

Quote:

You could try either;
Code:

apt-get install kde-standard
or;
Code:

apt-get install kde-full
Either one should give you a more complete install unless that meta-package has already been installed. (in which case you'll get the message, "xxx is already the newest version.")
I tried both. 'kde-standard' gave "No packages will be installed..."
'kde-full' seemed to be working. It went on for a long time, asked me to insert the installation DVD in 'cdrom'on several occasions, but ended with additional requests to insert the installation DVD in 'cdrom' which I did, but the same message kept returning and the attempt failed.

I'll fuss with this again and start a new thread if no joy.

r.


All times are GMT -5. The time now is 05:14 AM.